package cn.com.manager.utility;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ApplicationConstants {
	/**
	 * 页面分页每页条数
	 */
	public static int pageSize;
	public static String algorithmName;
	public static int hashIterations;
	public static String IMG_WEB;
	public static String icon_path;
	
	/**
	 * 微博
	 */
	
	public static Long weibo_show_user_newtop;
	public static Long weibo_show_recent_post_amount;
	public static Long weibo_recent_post_amount;
	public static Long weibo_redis_post_amount;

	public static final String SESSION_LOGOUT="session_logout";

	@Value("#{config['page.pageSize']}")
	public void setPageSize(int pageSize) {
		ApplicationConstants.pageSize = pageSize;
	}

	@Value("#{config['password.hashIterations']}")
	public void setHashIterations(int hashIterations) {
		ApplicationConstants.hashIterations = hashIterations;
	}

	@Value("#{config['password.algorithmName']}")
	public void setAlgorithmName(String algorithmName) {
		ApplicationConstants.algorithmName = algorithmName;
	}

	@Value("#{config['img_web']}")
	public void setIMG_WEB(String iMG_WEB) {
		ApplicationConstants.IMG_WEB = iMG_WEB;
	}

	@Value("#{config['icon_path']}")
	public void setIcon_path(String icon_path) {
		ApplicationConstants.icon_path = icon_path;
	}

	@Value("#{config['weibo_show_user_newtop']}")
	public void setWeibo_show_user_newtop(Long weibo_show_user_newtop) {
		ApplicationConstants.weibo_show_user_newtop = weibo_show_user_newtop;
	}

	@Value("#{config['weibo_show_recent_post_amount']}")
	public void setWeibo_show_recent_post_amount(Long weibo_show_recent_post_amount) {
		ApplicationConstants.weibo_show_recent_post_amount = weibo_show_recent_post_amount;
	}

	@Value("#{config['weibo_recent_post_amount']}")
	public void setWeibo_recent_post_amount(Long weibo_recent_post_amount) {
		ApplicationConstants.weibo_recent_post_amount = weibo_recent_post_amount;
	}

	@Value("#{config['weibo_redis_post_amount']}")
	public void setWeibo_redis_post_amount(Long weibo_redis_post_amount) {
		ApplicationConstants.weibo_redis_post_amount = weibo_redis_post_amount;
	}
	
	
	
	
	
	
	
	
}
